//
//  UIImage+imageExtention.h
//  SharedGym
//
//  Created by Jiang on 2017/4/18.
//
//

#import <UIKit/UIKit.h>

extern UIImage* UIImageWithColor(UIColor *color);
extern UIImage* UIImageWithName(NSString *name);

@interface UIImage (Property)
///宽高比
@property (nonatomic,assign,readonly)CGFloat aspectRatio;
@end

@interface UIImage (Color)
+ (UIImage *)imageWithColor:(UIColor *)color;
+ (UIImage *)imageWithColor:(UIColor *)color size:(CGSize)size;
//使用mask重新渲染图片颜色
- (UIImage *)imageRenderWithColor:(UIColor *)color;

+ (UIImage *)gradientImage:(BOOL)isHorizontal
                startColor:(UIColor *)startColor
                  endColor:(UIColor *)endColor;

//线性渐变图片
+ (UIImage *)linearGradientImage:(CGSize)size
                    isHorizontal:(BOOL)isHorizontal
                       locations:(NSArray <NSNumber *>*)locations
                      startColor:(UIColor *)startColor
                        endColor:(UIColor *)endColor;
@end

@interface UIImage (Radius)
///圆形图片
- (UIImage *)circleImage;
///添加圆角
- (UIImage *)cornerImageWithCornerRadius:(CGFloat)radius;
- (UIImage *)cornerImageWithCornerRadius:(CGFloat)radius fillColor:(UIColor *)fillColor;
///获取正中心的正方形
- (UIImage *)centerSquare;
@end
@interface UIImage (Resize)
- (UIImage *)imageInset:(UIEdgeInsets)insets;
- (UIImage *)resizeImage:(CGSize)size;
@end


@interface UIImage (Blur)

@end

@interface UIImage (Orientation)
+ (UIImage *)fixOrientation:(UIImage *)aImage;
@end

@interface UIImage (QrCodeBarCode)
+ (UIImage *)barcodeImageWithContent:(NSString *)content codeImageSize:(CGSize)size color:(UIColor *)color;
//改变条形码尺寸大小
+ (UIImage *)barcodeImageWithContent:(NSString *)content codeImageSize:(CGSize)size;
//生成最原始的条形码
+ (CIImage *)barcodeImageWithContent:(NSString *)content;
@end



@interface UIImage (Application)
+ (UIImage *)profileMemberShipCircle:(CGSize)size maxPoint:(CGFloat)max currentPoint:(CGFloat)current;
@end

